package com.jeesite.modules.rt.entity;

import javax.validation.constraints.Size;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;
import com.jeesite.modules.ic.entity.IcUser;

/**
 * 路由器设备Entity
 * @author 李寒冰
 * @version 2024-09-26
 */
@Table(name="rt_device", alias="a", label="路由器设备信息", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="sn", attrName="sn", label="设备号"),
		@Column(name="user_id", attrName="userId", label="所属客户ID"),
		@Column(name="pipe_type", attrName="pipeType", label="设备类型"),
		@Column(name="model", attrName="model", label="设备架构"),
		@Column(name="bind", attrName="bind", label="绑定用户"),
		@Column(name="create_time", attrName="createTime", label="设备创建时间", isUpdateForce=true),
		@Column(name="frozen", attrName="frozen", label="是否冻结  0正常 1已冻结"),
		@Column(name="flow", attrName="flow", label="实时上行"),
		@Column(name="flow_download", attrName="flowDownload", label="实时下行"),
		@Column(name="remark", attrName="remark", label="备注"),
		@Column(name="online", attrName="online", label="设备状态"),
		@Column(name="net_type", attrName="netType", label="拨号类型"),
		@Column(name="dial_result", attrName="dialResult", label="拨号结果"),
		@Column(name="upload_speed", attrName="uploadSpeed", label="测速总带宽"),
		@Column(name="refresh_time", attrName="refreshTime", label="设备刷新时间"),
		@Column(name="up_refresh_time", attrName="upRefreshTime", label="上行刷新时间"),
		@Column(name="down_refresh_time", attrName="downRefreshTime", label="下行刷新时间"),
		@Column(name="status", attrName="status", label=""),
		@Column(name="type", attrName="type", label="1 路由器"),
		@Column(name="isp_code", attrName="ispCode", label="运营商"),
		@Column(name="nat", attrName="nat", label="NAT",queryType = QueryType.LIKE),
		@Column(name="qrcode", attrName="qrcode", label="二维码"),
		@Column(name="xuliehao", attrName="xuliehao", label="序列号"),
		@Column(name="quyuxianzhi", attrName="quyuxianzhi", label="区域限制0全国 2省内"),
		@Column(name="set_time", attrName="setTime", label="区域设置时间"),
		@Column(name="channel_type", attrName="channelType", label="1领雾  2麻雀"),
		@Column(name="shengchan_status", attrName="shengchanStatus", label="1待生产 2已生产"),
		@Column(name="stage", attrName="stage", label="节点业务阶段"),
		@Column(name="self_starting", attrName="selfStarting", label="自启动 1是 0否"),
		@Column(name="white_list", attrName="whiteList", label="白名单 1是 0否"),
		@Column(name="device_type", attrName="deviceType", label="1 盒子 2APK"),
		@Column(name="is_ipv6", attrName="isIpv6", label="是否是ipv6（0：不是，1：是）"),
	}, orderBy="a.id DESC"
)
public class RtDevice extends DataEntity<RtDevice> {
	
	private static final long serialVersionUID = 1L;
	private String sn;		// 设备号
	private String userId;		// 所属客户ID
	private String pipeType;		// 设备类型
	private String model;		// 设备架构
	private String bind;		// 绑定用户
	private Date createTime;		// 设备创建时间
	private String frozen;		// 是否冻结  0正常 1已冻结
	private String flow;		// 实时上行
	private String flowDownload;		// 实时下行
	private String remark;		// 备注
	private String online;		// 设备状态
	private String netType;		// 拨号类型
	private String dialResult;		// 拨号结果
	private String uploadSpeed;		// 测速总带宽
	private Date refreshTime;
	private Date upRefreshTime;
	private Date downRefreshTime;
	private Integer type;
	private Integer ispCode;
	private String nat;
	private String qrcode;
	private String xuliehao;
	private String quyuxianzhi;
	private Date setTime;
	private String channelType;
	private String mac;
	private String shengchanStatus;
	private String stage;
	private String selfStarting;
	private String whiteList;
	private String deviceType;
	private String isIpv6;

	public String getIsIpv6() {
		return isIpv6;
	}

	public void setIsIpv6(String isIpv6) {
		this.isIpv6 = isIpv6;
	}

	public String getSelfStarting() {
		return selfStarting;
	}

	public void setSelfStarting(String selfStarting) {
		this.selfStarting = selfStarting;
	}

	public String getWhiteList() {
		return whiteList;
	}

	public void setWhiteList(String whiteList) {
		this.whiteList = whiteList;
	}

	public String getDeviceType() {
		return deviceType;
	}

	public void setDeviceType(String deviceType) {
		this.deviceType = deviceType;
	}

	public Boolean getError() {
		return isError;
	}

	public void setError(Boolean error) {
		isError = error;
	}

	public String getStage() {
		return stage;
	}

	public void setStage(String stage) {
		this.stage = stage;
	}

	public String getShengchanStatus() {
		return shengchanStatus;
	}

	public void setShengchanStatus(String shengchanStatus) {
		this.shengchanStatus = shengchanStatus;
	}

	//扩展字段
	public String getMac() {
		return mac;
	}

	public void setMac(String mac) {
		this.mac = mac;
	}

	public String getChannelType() {
		return channelType;
	}

	public void setChannelType(String channelType) {
		this.channelType = channelType;
	}

	public Date getSetTime() {
		return setTime;
	}

	public void setSetTime(Date setTime) {
		this.setTime = setTime;
	}

	public String getQuyuxianzhi() {
		return quyuxianzhi;
	}

	public void setQuyuxianzhi(String quyuxianzhi) {
		this.quyuxianzhi = quyuxianzhi;
	}

	//扩展字段
	private String mobile;
	private String dailishangId;

	public String getDailishangId() {
		return dailishangId;
	}

	public void setDailishangId(String dailishangId) {
		this.dailishangId = dailishangId;
	}

	public String getXuliehao() {
		return xuliehao;
	}

	public void setXuliehao(String xuliehao) {
		this.xuliehao = xuliehao;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	private IcUser icUser;

	public IcUser getIcUser() {
		return icUser;
	}

	public void setIcUser(IcUser icUser) {
		this.icUser = icUser;
	}




	//扩展字段
	private String ispStr;
	private String fenzuName;
	private Boolean isError;//是否报警

	public Boolean getIsError() {
		return isError;
	}

	public void setIsError(Boolean isError) {
		this.isError = isError;
	}

	public String getQrcode() {
		return qrcode;
	}

	public void setQrcode(String qrcode) {
		this.qrcode = qrcode;
	}

	public String getFenzuName() {
		return fenzuName;
	}

	public void setFenzuName(String fenzuName) {
		this.fenzuName = fenzuName;
	}

	public String getIspStr() {
		return ispStr;
	}

	public void setIspStr(String ispStr) {
		this.ispStr = ispStr;
	}

	public Integer getIspCode() {
		return ispCode;
	}

	public void setIspCode(Integer ispCode) {
		this.ispCode = ispCode;
	}

	public String getNat() {
		return nat;
	}

	public void setNat(String nat) {
		this.nat = nat;
	}

	public Integer getType() {
		return type;
	}

	public void setType(Integer type) {
		this.type = type;
	}

	public Date getUpRefreshTime() {
		return upRefreshTime;
	}

	public void setUpRefreshTime(Date upRefreshTime) {
		this.upRefreshTime = upRefreshTime;
	}

	public Date getDownRefreshTime() {
		return downRefreshTime;
	}

	public void setDownRefreshTime(Date downRefreshTime) {
		this.downRefreshTime = downRefreshTime;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getRefreshTime() {
		return refreshTime;
	}

	public void setRefreshTime(Date refreshTime) {
		this.refreshTime = refreshTime;
	}

	public RtDevice() {
		this(null);
	}
	
	public RtDevice(String id){
		super(id);
	}
	
	@Size(min=0, max=255, message="设备号长度不能超过 255 个字符")
	public String getSn() {
		return sn;
	}

	public void setSn(String sn) {
		this.sn = sn;
	}
	
	@Size(min=0, max=255, message="所属客户ID长度不能超过 255 个字符")
	public String getUserId() {
		return userId;
	}

	public void setUserId(String userId) {
		this.userId = userId;
	}
	
	@Size(min=0, max=10, message="设备类型长度不能超过 10 个字符")
	public String getPipeType() {
		return pipeType;
	}

	public void setPipeType(String pipeType) {
		this.pipeType = pipeType;
	}
	
	@Size(min=0, max=10, message="设备架构长度不能超过 10 个字符")
	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}
	
	@Size(min=0, max=10, message="绑定用户长度不能超过 10 个字符")
	public String getBind() {
		return bind;
	}

	public void setBind(String bind) {
		this.bind = bind;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Size(min=0, max=10, message="是否冻结  0正常 1已冻结长度不能超过 10 个字符")
	public String getFrozen() {
		return frozen;
	}

	public void setFrozen(String frozen) {
		this.frozen = frozen;
	}
	
	@Size(min=0, max=255, message="实时上行长度不能超过 255 个字符")
	public String getFlow() {
		return flow;
	}

	public void setFlow(String flow) {
		this.flow = flow;
	}
	
	@Size(min=0, max=255, message="实时下行长度不能超过 255 个字符")
	public String getFlowDownload() {
		return flowDownload;
	}

	public void setFlowDownload(String flowDownload) {
		this.flowDownload = flowDownload;
	}
	
	@Size(min=0, max=255, message="备注长度不能超过 255 个字符")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}
	
	@Size(min=0, max=10, message="设备状态长度不能超过 10 个字符")
	public String getOnline() {
		return online;
	}

	public void setOnline(String online) {
		this.online = online;
	}
	
	@Size(min=0, max=255, message="拨号类型长度不能超过 255 个字符")
	public String getNetType() {
		return netType;
	}

	public void setNetType(String netType) {
		this.netType = netType;
	}
	
	@Size(min=0, max=255, message="拨号结果长度不能超过 255 个字符")
	public String getDialResult() {
		return dialResult;
	}

	public void setDialResult(String dialResult) {
		this.dialResult = dialResult;
	}
	
	@Size(min=0, max=255, message="测速总带宽长度不能超过 255 个字符")
	public String getUploadSpeed() {
		return uploadSpeed;
	}

	public void setUploadSpeed(String uploadSpeed) {
		this.uploadSpeed = uploadSpeed;
	}
	
}